home *** CD-ROM | disk | FTP | other *** search
- Path: news.wyoming.com!usenet
- From: dcromley@wyoming.com (Dave Cromley)
- Newsgroups: comp.lang.c++
- Subject: Re: Class Pointer Array (HELP)
- Date: 6 Mar 1996 21:15:52 GMT
- Organization: wyoming.com LLC
- Message-ID: <4hkva8$rra@horn.wyoming.com>
- References: <4hfs8d$a0@nnrp1.news.primenet.com>
- NNTP-Posting-Host: cys-cap-6.wyoming.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.99.2
-
- Brad wrote:
- >.. a pointer array of ..
- >.. I got this same routine to work with integers, but can't get it
- >to work with the class. Help!!!
-
- There isn't much to go on here, but be sure you have a copy constructor,
- since you have pointers. You can't accept the default copy constructor.
- The copy constructor has to make a 'new' item and and use the new
- pointer--not just copy the pointer. Then copy the old item data to
- the new item data.
-
- I find that using the printf("%4X%4X", ptr) makes for good
- debugging--it gives you the hex value of pointers (or anything).
-
- Dave C.
-
-